home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation How-To
/
Animation How-to CD.iso
/
PLY
/
CHAPTER2
/
DICE
/
DICE2.PI
< prev
next >
Wrap
Text File
|
1994-01-01
|
2KB
|
77 lines
// DICE2.PI
start_frame 0
end_frame 359
total_frames 360
outfile "dice"
viewpoint {
from <8, 8, 8>
at <0,0,0>
up <0,1,0>
angle 40
resolution 320,200
aspect 1.433
}
background SkyBlue
include "\ply\colors.inc"
spot_light white, <-5,10, 5>,<0,0,0>,3,5,20
spot_light white, < 5,10, 5>,<0,0,0>,3,5,20
define die1
object {
object {box <-2,-2,-2>,<2,2,2> }
//1
- object {sphere < 0, 0,-2>, 0.4 matte_black }
//2
- object {sphere <-2,-1,-1>, 0.4 matte_black }
- object {sphere <-2, 1, 1>, 0.4 matte_black }
//3
- object {sphere <-1,-2,-1>, 0.4 matte_black }
- object {sphere < 0,-2, 0>, 0.4 matte_black }
- object {sphere < 1,-2, 1>, 0.4 matte_black }
//4
- object {sphere <-1, 2,-1>, 0.4 matte_black }
- object {sphere < 1, 2,-1>, 0.4 matte_black }
- object {sphere <-1, 2, 1>, 0.4 matte_black }
- object {sphere < 1, 2, 1>, 0.4 matte_black }
//5
- object {sphere < 2, 0, 0>, 0.4 matte_black }
- object {sphere < 2,-1,-1>, 0.4 matte_black }
- object {sphere < 2, 1, 1>, 0.4 matte_black }
- object {sphere < 2,-1, 1>, 0.4 matte_black }
- object {sphere < 2, 1,-1>, 0.4 matte_black }
//6
- object {sphere <-1, 1, 2>, 0.4 matte_black }
- object {sphere < 0, 1, 2>, 0.4 matte_black }
- object {sphere < 1, 1, 2>, 0.4 matte_black }
- object {sphere <-1,-1, 2>, 0.4 matte_black }
- object {sphere < 0,-1, 2>, 0.4 matte_black }
- object {sphere < 1,-1, 2>, 0.4 matte_black }
}
define dice
object {
die1 { rotate <45,45,0> }
* object { sphere < 0, 0, 0>, 2.85 }
}
define pi 3.14159
define rad pi/180
define ang frame * rad
define factor 90
define xrotate factor * (2 * SIN(ang) + SIN(3 * ang) / 3)
define yrotate factor * (2 * COS(ang) - COS(3 * ang) / 3)
define zrotate factor * (COS(2 * ang))
dice { rotate <xrotate,yrotate,zrotate> }
include "marker.inc"